<%Const respagecode="res_search"%><% 'UTF-8%>
<%''加载通用函数和数据库连接%>
<!--#include file="../Include/Start.asp"-->
<%'检查是否登录%>
<!--#include file="../Include/checklogin.asp"-->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<!--meta信息-->
	<!--#include file="../Include/meta.asp"-->
	

	<link href="../css/css-1.05.css" rel="stylesheet" type="text/css" />
	<link href="../css/console-1.03.css" rel="stylesheet" type="text/css" />
	<link href="../css/calendar.css" rel="stylesheet" type="text/css" />
	<link href="../css/console_home-1.06.css" rel="stylesheet" type="text/css" />
	
	<script type="text/javascript" src="../js/jquery-1.3.2.js"></script>
	<script type="text/javascript" src="../js/jquery.extend-1.06.js"></script>
	<script type="text/javascript" src="../js/common_1.01.js"></script>
	<script type="text/javascript" src="../js/console_res.js"></script>
	<script type="text/javascript" src="../js/menu.js"></script>
	<script type="text/javascript" src="../js/TrimPathTemplate.js"></script>
</head>

<body>
<div class="wrapper">

	<!--header页头信息-->
	<!--#include file="../Include/header.asp"-->
	<!--end header页头信息-->


	<!--navigation菜单信息-->
	<!--#include file="../Include/navigation.asp"-->
	<script type="text/javascript">$("#navigation").menu('point');</script>
	<!--end navigation菜单信息-->

<!--begin container-->
<div class="container" id="container">
 
	
	<!--<div class="c_left">
		<h2>权限管理</h2>
		<ul>
			<li><h3><a href="/admin/users.asp">用户</a></h3></li>
			<li><h3><a href="/admin/roles.asp">角色</a></h3></li>
			<li class="on"><h3><a href="/admin/resources.asp">资源</a></h3></li>
		</ul>
	</div>-->
	<div class="c_left">
		<!--begin left_menu 左侧菜单信息-->
		<!--#include file="../Include/left_menu.asp"-->
		<!--end left_menu 左侧菜单信息-->	
	</div>
	<div class="c_right">
		<div class="c_r_head">
			<ul class="head_tab">
				<li class="on"><h4><a href="resources.asp##div_tab_list">资源管理</a></h4></li>
				<li><h4><a href="resources.asp##div_tab_add">新增</a></h4></li>
			</ul>
		</div>
		<div class="c_r_body" id="div_tab_list">
			<form id="scform" action="resources_do.asp" method="post" >
				<input id="page" name="page" type="hidden" value="1" />
			<div align="center" style="height:25px">
					查询资源信息
			</div>
			<table width="100%" border="0" cellpadding="0" cellspacing="2" style="margin:auto"> 
				<tr>
					<td align="right">资源名称:</td>
					<td><input type="text" name="resname" id="resname" class="text" value="" style="width:90px" maxlength="10" /></td>
				</tr>
				<tr>
					<td align="right">资源代码:</td>
					<td><input type="text" name="resnum" id="resnum" class="text" value="" style="width:90px" maxlength="10" /></td>
				</tr>
				<tr>
					<td align="right">对应URL:</td>
					<td><input type="text" name="resurl" id="resurl" class="text" value="" style="width:90px" maxlength="10" /></td>
				</tr>
				<tr>
					<td height="30">&nbsp;</td>
					<td><input type="submit" value="查  询" /></td>
				</tr>
			</table>
			</form>
			<!--查询结果显示 begin-->
			<div id="div_rslist"></div>
			<!--查询结果显示 end-->
		 <!--Trimpath Templates begin-->
			<!--缓存json数据 并将其转换成对象obj_json_data-->
		  <div id="div_load_json_temp" style='display:none;' ></div>
				
				<div  style='display:none;'  >
				 <textarea name="template_jst" id="template_jst"   >
				<!--显示记录列表begin-->
				<table width="100%" border="0" cellpadding="2" cellspacing="0" class="list">
					<colgroup>
						<col width="30"/>
						{var colume_list =['资源ID','资源代码','资源名称','菜单名称','对应URL','节点路径','操作']}
						{for colume_name in colume_list}
										<col/>
						{/for}
					</colgroup>
					<thead>
						<tr>
							<th align="center"><input type="checkbox" onclick="checkboxAll('id_all',this)" name="checkboxAll"/></th>
							{for colume_name in colume_list}
										<th>@{colume_name}</th>
							{/for}
						</tr>
					</thead>
					<tr class="line">
						<td colspan="@{1+colume_list.length}"><div></div></td>
					</tr>
					<tbody>
				{var flag_Num =1}
				{var tr_class ='bgblue'}
				{for p in rslist}
				     <tr class="@{tr_class}" onmouseover="$(this).addClass('on')" onmouseout="$(this).removeClass('on')">
					     	<td align="center"><input type="checkbox" value="@{p.id}" name="id_all" id="id_all"/></td>
					     	<td>@{p.id}</td>
					     	<td>@{p.res_num}</td>
					     	<td>@{p.res_name}</td>
					     	<td>@{p.menu_name}</td>
					     	<td>@{p.res_url}</td>
					     	<td>@{p.res_path}</td>					     	
					     	
					     	<td><a href="resources_edit.asp?act=edit&id=@{p.id}">修改</a>
					      <a onclick="rs_el_Delete('@{p.id}')" href="javascript:void(0);">删除</a></td>
					     
				     </tr>
				{if tr_class=='bgblue' }{var tr_class =''}{else}{var tr_class ='bgblue'}{/if}				
				{forelse}
				     <tr><td colspan="@{1+colume_list.length}">没有查询结果...</tr>
				{/for}
					</tbody>
					<tr class="line">
						<td colspan="@{1+colume_list.length}"><div></div></td>
					</tr>
				</table>
				<!--显示记录列表end-->
				<!--分页begin-->			
				{if page.PageSizeCur>0 }
				<table cellspacing="0" cellpadding="0" border="0" width="100%">
					<tbody>
						<tr>
							<td height="30">
								<div class="pages">
									{if page.PageCur>1}				
									<a title="第一页" class="first" onclick='loadRsList("1")' href="javascript:void(0);">1 ..</a>
									<a title="上一页" class="prev"  onclick='loadRsList("@{page.PageCur-1}")' href="javascript:void(0);">‹上一页</a>{/if}
									<strong>[@{page.PageCur}]</strong>
									{if page.PageCur<page.PageTotalNum}
									<a title="下一页" class="next"  onclick='loadRsList("@{page.PageCur-(-1)}")' href="javascript:void(0);">下一页›</a>
									<a title="最后一页" class="last" onclick='loadRsList("@{page.PageTotalNum}")' href="javascript:void(0);">@{page.PageTotalNum} ..</a>{/if}
									<em>共 @{page.PageTotalNum} 页</em>
								</div>
							</td>
						</tr>
					</tbody>
				</table>
				{/if}		
				<!--分页end-->
		</textarea>
	</div>
				
	<!--Trimpath Templates End-->			
			
			
			
		</div>
		<div class="c_r_body" id="div_tab_add">
			<form action="resources_do.asp" method="post" id="form_add">
				<input id="id" type="hidden" value="" />
			<div align="center" style="height:25px">
			请输入资源的详细信息
			</div>
				<table width="100%" border="0" cellpadding="2" cellspacing="4" style="margin:auto">
		 
					<tr>
						<td align="right">资源代码:</td>
						<td><input type="text" name="res_num" id="res_num" class="text" style="width:100px" maxlength="50" /></td>
					</tr>
					<tr>
						<td align="right">资源名称:</td>
						<td><input type="text" name="res_name" id="res_name" class="text" style="width:100px" maxlength="50" /></td>
					</tr>
					<tr>
						<td align="right">菜单名称:</td>
						<td><input type="text" name="menu_name" id="menu_name" class="text" style="width:100px" maxlength="50" /></td>
					</tr>
					<tr>
						<td align="right">菜单代码:</td>
						<td><input type="text" name="menu_code" id="menu_code" class="text" style="width:100px" maxlength="50" /></td>
					</tr>
					<tr>
						<td align="right">菜单序号:</td>
						<td><input type="text" name="menu_num" id="menu_num" class="text" style="width:100px" maxlength="50" /></td>
					</tr>
					<tr>
						<td align="right">对应URL:</td>
						<td><input type="text" name="res_url" id="res_url" class="text" style="width:100px" maxlength="50" /></td>
					</tr>
					<tr>
						<td align="right">父层节点路径:</td>
						<td><input type="text" name="res_ppath" id="res_ppath" class="text" style="width:90px" maxlength="50" /></td>
					</tr>
					<tr>
						<td align="right">是否显示为菜单项:</td>
						<td><input type="text" name="res_ppath" id="res_ppath" class="text" style="width:90px" maxlength="50" VALUE="0" />(0:不显示；1:显示)</td>
					</tr>
					<tr>
						<td align="right"> </td>
						<td><input name="" type="submit" value="添加资源" />&nbsp;<label id="result"></label></td>
					</tr>
				</table>
			</form>
		</div>
	</div>

	<script type="text/javascript">
		/*选中该tab页 需要tab页上有ID*/
		$("#Permissions").attr("className","on")
		
		initPage();	
		$('#scform').submit();
</script>
	
 
 
</div>



	
	
</div>
<!--footer页脚信息-->
<!--#include file="../Include/footer.asp"-->
<!--end footer页脚信息-->
</div>
</body>
</html>
